package com.housekeeping.housekeeping.user.service;

import com.housekeeping.housekeeping.user.entity.Account;
import com.housekeeping.housekeeping.user.entity.AccountVo;

import java.sql.SQLException;

public interface UserService {
    /**
     * 用户注册
     * @param account 注册账户实体
     * @return 成功插入新账户数
     * @throws SQLException
     */
    int register(Account account) throws SQLException;

    /**
     * 查询账户是否已存在
     * @param account 查询的账户号
     * @return 查询的账户号表中已存在数
     * @throws SQLException
     */
    int accountExist(String account) throws SQLException;

    /**
     * 用户登录
     * @param account
     * @param password
     * @return 1代表登录成功
     * @throws SQLException
     */
    AccountVo login(String account, String password) throws SQLException;
}
